<%@ taglib uri="/WEB-INF/translator.tld" prefix="trans" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%> 
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%> 
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%
 String ctx = request.getContextPath();
%>

 <LINK rel="stylesheet" type="text/css" href="<html:rewrite page='/alf.css'/>">	
<html:form action="/categories">
<trans:initPage module="catselector" />
<table align="center" cellpadding="5" cellspacing="1" border="0" background=<%=ctx%>/images/pixelbgtable.gif class="text_search">
<tr><td colspan="2" class="textalb" align="center"><trans:showPageMessage label="editor.addnew" /></td></tr>
<tr><td bgcolor="#FFFFFF">
<html:hidden property="id"/>
<trans:showPageMessage label="editor.catname" />: <html:text property="name" onkeydown="textCounter(this.form.name,this.form.cname,200);" onkeyup="textCounter(this.form.name,this.form.cname,200);"/><html:errors property="name"/> 
<input readonly type="text" name="cname" size="3" maxlength="4" value=""> <trans:showPageMessage label="charactersleft" /></br>
</td><td bgcolor="#FFFFFF">
<html:submit styleClass="butonsave" property="add_update">
<logic:equal name="editCategoryForm" property="id" value="0"><trans:showPageMessage label="editor.add" hide_link="true"/></logic:equal>
<logic:notEqual name="editCategoryForm" property="id" value="0"><trans:showPageMessage label="editor.update" hide_link="true" /></logic:notEqual>  
</html:submit>
</td></tr>
<tr><td bgcolor="#FFFFFF">
<logic:notEqual name="editCategoryForm" property="id" value="0">
<input class="butonsave" type="button" value="<trans:showPageMessage label="editor.addnewcat" hide_link="true" />" onclick="javascript:window.location.href='<html:rewrite page="/categories.do"/>';"/>
</logic:notEqual>  
</td><td bgcolor="#FFFFFF">

<input class=butonsave type="button" value="<trans:showPageMessage label="editor.categorieslist" hide_link="true" />" 
	onclick="javascript:window.location.href='<html:rewrite page="/categories.do?mode=list"/>';"/>
</td></tr><trans:showPageMessage label="translator.showhiddentags"/>
</html:form>
<script type="text/javascript" src="<html:rewrite page='/javascript/textCounter.js'/>"></script>